import React from 'react';
import { useRequest, defaultFormatResult } from '@/hooks';
import { ResultTable } from '@/pages/WorkFlow/components/CustomComponents/Regular/containers';
import { getInformalDetail } from '@/pages/WorkFlow/components/CustomComponents/Regular/services';

const Probation = ({ employeeCode }) => {
    const { data: detailInfo } = useRequest(() => getInformalDetail(employeeCode), {
        ready: !!employeeCode,
        ...defaultFormatResult
    });

    return <ResultTable dataSource={detailInfo?.assess} levels={detailInfo?.abilityAssessVO?.levels || []} />;
};

export default Probation;
